package com.lyk.coursearrange.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_customer_information")
@Builder
public class CustomerInformation extends Model<CustomerInformation> {
    private static final long serialVersionUID = 1L;

    /**
     * 客资id
     */
    @TableId(value = "customer_id", type = IdType.AUTO)
    private Long customerId;

    /**
     * 微信号
     */
    @TableField("customer_wx")
    private String customerWx;

    /**
     * 客资来源
     */
    @TableField("customer_source")
    private Long customerSource;

    /**
     * 来源负责人
     */
    @TableField("customer_sourcepeople")
    private Long customerSourcepeople;

    /**
     * 客资截图
     */
    @TableField("customer_url")
    private String customerUrl;

    /**
     * 枚举教师id
     */
    @TableField("customer_teacherid")
    private Long customerTeacherid;



    /**
     * 线上诊断教师id
     */
    @TableField("teacher_id_online")
    private Long teacherIdOnline;
    /**
     * 线下诊断教师id
     */
    @TableField("teacher_id_offline")
    private Long teacherIdOffline;



    /**
     * 学生id
     */
    @TableField("student_id")
    private Integer studentId;

    /**
     * 学生姓名
     */
    @TableField("customer_student")
    private String customerStudent;

    /**
     * 客资状态 1.新课 2.未通过 3.已通过
     */
    @TableField("customer_state")
    private Long customerState;
    /**
     * 所属账号
     */
    @TableField("customer_account")
    private String customerAccount;

    /**
     * 截图类型：1微信号 2.微信二维码
     */
    @TableField("customer_type")
    private Long customerType;

    /**
     * 主动或者被动：1主动 2被动
     */
    @TableField("customer_isactive")
    private Long customerIsactive;

    /**
     * 微信二维码图片地址
     */
    @TableField("customer_ewm")
    private String customerEwm;


    @TableField(value = "customer_allpaymoney",updateStrategy = FieldStrategy.IGNORED)
    private Double customerAllpaymoney;

    @TableField(value = "pay_alltype",updateStrategy = FieldStrategy.IGNORED)
    private Integer payAlltype;

    /**
     * 付款时间
     */
    @TableField(value = "customer_allpaytime",updateStrategy = FieldStrategy.IGNORED)
    private String customerAllpaytime;

    /**
     * 所属销售
     */
    @TableField("customer_sale")
    private Long customerSale;

    /**
     * 是否交诊断费
     */
    @TableField("customer_ispay")
    private Long customerIspay;

    /**
     * 诊断费用
     */
    @TableField(value = "customer_paymoney",updateStrategy = FieldStrategy.IGNORED)
    private Double customerPaymoney;

    /**
     * 付款时间
     */
    @TableField(value = "customer_paytime",updateStrategy = FieldStrategy.IGNORED)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private String customerPaytime;


    /**
     * 是否交全款
     */
    @TableField("customer_isallpay")
    private Long customerIsallpay;
    /**
     * 付款类型
     */
    @TableField(value = "pay_type",updateStrategy = FieldStrategy.IGNORED)
    private Integer payType;

    /**
     * 存储Json的字段
     */
//    @TableField("customer_json")
//    private String customerJson;


    /**
     * 状态[1-未提交，2-已提交]
     */
    @TableField("type")
    private Integer type;


    @TableField(exist = false)
    private int pageNum;
    @TableField(exist = false)
    private int pageSize;

    @TableField(exist = false)
    private List<Stages> stages;


    @TableField(exist = false)
    private String studentName;


    @TableField(exist = false)
    private String[] grade;

    @TableField(exist = false)
    private String sex;

    @TableField(exist = false)
    private String sex2;

    @TableField(exist = false)
    private String address;

    @TableField(exist = false)
    private Integer[] courseCategoryId;

    @TableField("course_category_id")
    private Integer categoryId;

    @TableField("start_time")
    private String startTime;

    @TableField("is_submit")
    private Integer isSubmit;

    @TableField("parent_phone_number")
    private String parentPhoneNumber;





    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


    @TableField(exist = false)
    private String gradeId;
    @TableField(exist = false)
    private String gradeParentId;

    @TableField(exist = false)
    private String gradeIdArr;
    @TableField(exist = false)
    private int[] gradeIdArr2;
    @TableField(exist = false)
    private String gradeName;
    @TableField(exist = false)
    private String categoryName;
    @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private String categoryParentId;

    @TableField(exist = false)
    private String categoryIdArr;
    @TableField(exist = false)
    private int[] categoryIdArr2;


    @TableField(exist = false)
    private String gradeIdArrToStr;

    @TableField(exist = false)
    private String categoryIdArrToStr;

    @TableField(exist = false)
    private String[] gradeIdArrToStr2;

    @TableField(exist = false)
    private String[] categoryIdArrToStr2;

    @TableField(exist = false)
    private String payType2;

    @TableField(exist = false)
    private String payAllType2;


    //    ----------------------------------------------



}
